<?php defined('BASEPATH') or exit('No direct script access allowed');

class Module_Winner extends Module {

	public $version = 1.1;

	public function info()
	{
		return array(
			'name' => array(
				'nl' => 'Winner',
				'en' => 'Winner'
			),
			'description' => array(
				'nl' => 'Winner Management',
				'en' => 'Winner Management'
				),
			'frontend' => TRUE,
			'backend' => TRUE,
			'skip_xss'	=> TRUE,
			'menu'		=> 'Winner',
		);
	}

	public function install()
	{
		return $this->db->query("
			CREATE  TABLE IF NOT EXISTS ".$this->db->dbprefix('stoepje_winners')." (
						`id` INT NOT NULL AUTO_INCREMENT ,
						`code` VARCHAR(255) NULL ,
				  		`salutation` VARCHAR(255) NULL ,
				  		`first_name` VARCHAR(255) NULL ,
				  		`last_name` VARCHAR(255) NULL ,
				  		`email` VARCHAR(255) NULL ,
				  		`ip` VARCHAR(255) NULL ,
				  		`submit_time` INT(11) NULL ,
			  			PRIMARY KEY (`id`)
					) ENGINE=InnoDB DEFAULT CHARSET=utf8
				");
	}

	public function uninstall()
	{
		return TRUE;
	}

	public function upgrade($old_version)
	{
		// Your Upgrade Logic
		return TRUE;
	}

	public function help()
	{
		// Return a string containing help info
		// You could include a file and return it here.
		return "This module has no inline docs as it does not have a back-end.";
	}
}
/* End of file details.php */